package com.xieyong.mywebsite.util;

import java.util.Map;

public class ThreadLocalUtil {

    private static final ThreadLocal THREAD_LOCAL = new ThreadLocal();

    public static Map<String, Object> get() {
        return (Map<String, Object>) THREAD_LOCAL.get();
    }

    public static void set(Object value) {
        THREAD_LOCAL.set(value);
    }

//    清楚threadlocal 防止内存泄漏
    public static void remove() {
        THREAD_LOCAL.remove();
    }
}
